
//
//  STUserAccountDTO.m
//  OCVVeibo
//
//  Created by leergou on 16/7/22.
//  Copyright © 2016年 WhiteHouse. All rights reserved.
//

#import "STUserAccountDTO.h"

@implementation STUserAccountDTO

// 重写 expires_in 的set 方法,计算过期日期
- (void)setExpires_in:(NSString *)expires_in{
    _expires_in = expires_in;
    
    _expires_date = [NSDate dateWithTimeIntervalSinceNow:expires_in.doubleValue];
}


// 归档
- (void)encodeWithCoder:(NSCoder *)aCoder{
    
    [self yy_modelEncodeWithCoder:aCoder];
}

// 解档
- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    
    if (self = [super init]) {
        
    }
    return [self yy_modelInitWithCoder:aDecoder];
}


- (NSString *)description{
    
    NSArray *keys = @[@"access_token",@"expires_in",@"uid",@"screen_name",@"avatar_large"];
    
    return [NSString stringWithFormat:@"<%@: %p>,%@",self.class,self,[self dictionaryWithValuesForKeys:keys]];
}

@end
